home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
253_01
/
singleio.c
< prev
next >
Wrap
Text File
|
1990-02-13
|
563b
|
30 lines
/* Chapter 9 - Program 2 */
#include <stdio.h>
#include <conio.h>
void main()
{
char c;
printf("Enter any characters, terminate program with X\n");
do {
c = getch(); /* get a character */
putchar(c); /* display the hit key */
} while (c != 'X');
printf("\nEnd of program.\n");
}
/* Result of execution
Enter any characters, terminate program with X
(The output depends on the characters you type in.)
End of program.
*/